Joe Mack scored on a throwing error by Coby Mayo in the bottom of the ninth inning to lift the Miami Marlins to a 4-3 walk-off win over the Baltimore Orioles.